<?php if($this->rptType =='tskscd'):?>
<?php if($this->show =='list'):?>
<table class="normaltable" style="clear:both;">
<tr class="tit"><td><center>ID</center></td><td><center>Prior</center></td><td><center>Title</center></td><td><center>Start Date</center></td><td><center>End Date</center></td>   <td><center>Requester</center></td><td><center>PM</center></td><td><center>Resource</center></td><td><center>progress</center></td></tr>
<?php 
$this->taskList=array_reverse($this->taskList);
foreach($this->taskList as $task): ?>
<tr><td><center><?php echo $task['id']?></center></td><td><center><?php echo $task['Prior']?></center></td><td><a href="/task/detail/id/<?php echo $task['id']?>/"><?php echo $task['title']?></a></td><td><center><?php echo $task['date_start']?></center></td><td><center><?php echo $task['date_end']?></center></td> <td><center><?php echo $task['Requester']?></center></td><td><center><?php echo $task['PM']?></center></td><td><center><?php echo $task['Resource']?></center></td><td class="Tips_proc" title="Progress : ::<?php echo $task['progress']?>%"><center><img src="/task/process?proc=<?php echo $task['progress']?>" class="processbar"/></center></td></tr>
<?php endforeach;?>
</table>

<?php else: ?>
<?php 
foreach($this->taskList as $task){
 echo $task['title'].";".$task['progress']."\r\n";
} 
?>
<?php endif; ?>



<?php elseif($this->rptType=='userscd'): ?>

<?php if($this->show=="list"):
$this->taskList=array_reverse($this->taskList);
?>

	<table class="normaltable" style="clear:both;">
	<tr class="tit"><td><center>ID</center></td><td><center>Prior</center></td><td><center>Developer Name</center></td><td>Title</td><td><center>Start Date</center></td><td><center>End Date</center></td><td><center>Requester</center></td><td><center>PM</center></td><td><center>progress</center></td></tr>
	<?php 
	foreach($this->taskList as $task): ?>
	<tr><td><center><?php echo $task['id']?></center></td>  <td><center><?php echo $task['Prior']?></center></td>  <td><center><?php echo $task['name']?></center></td><td><a href="/task/detail/id/<?php echo $task['id']?>/"><?php echo $task['title']?></a></td><td><center><?php echo $task['date_start']?></center></td><td><center><?php echo $task['date_end']?></center></td><td><center><?php echo $task['Requester']?></center><td><center><?php echo $task['PM']?></center><td class="Tips_proc" title="Progress : ::<?php echo $task['progress']?>%"><center><img src="/task/process?proc=<?php echo $task['progress']?>" class="processbar"/></center></td></tr>
	<?php endforeach;?>

	</table>

<?php else:echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<chart>
	<series>
		<?php foreach($this->taskUserList as $k=>$v): ?>
		<value xid="<?php echo strtolower(str_replace(' ', "_", $k));?>" bg_color="#000000" bg_alpha="20"><?php echo $k?></value>
		<?php endforeach;?>
	</series>

	<graphs>

		
		<?php foreach($this->topTaskList as $topTask): ?>

			<graph gid="<?php echo $topTask['id']?>" title="<?php echo $topTask['title']?>" gradient_fill_colors="#33CCFF, #003366" data_labels="<?php echo $topTask['title']?>" fill_alpha="50">
				
				<?php foreach($this->taskList as $task): ?>
				<?php if($task['top_task_id']==$topTask['id']):?>
				<value xid="<?php echo strtolower(str_replace(' ', "_", $task['name']));?>" start="<?php echo $task['wdaystart']?>"><?php echo $task['wdayend']?></value>	
				<?php endif;?>
				<?php endforeach;?>		

			</graph>
	   	<?php endforeach;?>

   </graphs>  

</chart>

</xml>
<?php endif;?>

<?php else:echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<chart>
<graphs>
<graph gid="0">
<point x="2007-10-01 1" y="200"></point>
<point x="2007-10-01 2" y="300"></point>
<point x="2007-10-01 3" y="187"></point>
<point x="2007-10-01 4" y="187"></point>
<point x="2007-10-01 5" y="198"></point>
<point x="2007-10-01 6" y="400"></point>
<point x="2007-10-01 7" y="430"></point>      			
</graph>
</graphs>
</chart>
<?php endif;?>